<template>
  <div>
    <articlelist v-for="obj in list" :key="obj.art_id" :obj='obj'></articlelist>
  </div>
</template>

<script>
import { getnews } from '@/api'
import articlelist from './components/articleitem.vue'
export default {
  data () {
    return {
      list: []
    }
  },
  props: {
    id: Number
  },
  components: {
    articlelist
  },
  async created () {
    const res = await getnews(this.id)
    this.list = res.data.data.results
  }
}
</script>

<style>

</style>
